-
Notifications
You must be signed in to change notification settings - Fork 725
Download rework #2037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Download rework #2037
Conversation
app/src/main/java/com/lagradost/cloudstream3/services/DownloadQueueService.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/services/DownloadQueueService.kt
Outdated
Show resolved
Hide resolved
| .data(url) | ||
| .apply { | ||
| headers?.forEach { (key, value) -> | ||
| extras[Extras.Key<String>(key)] = value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headerBuilder["User-Agent"] = USER_AGENT
64fd296 to
66ea1b4
Compare
app/src/main/java/com/lagradost/cloudstream3/ui/download/DownloadFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/download/queue/DownloadQueueFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/download/queue/DownloadQueueAdapter.kt
Outdated
Show resolved
Hide resolved
|
The queue should now work regardless of how you try to interrupt it. Please test it @fire-light42 @Luna712 |
Luna712
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thank you. |
|
Fixed 👍 |
Luna712
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more issue, R.id.navigation_download_queue needs to be added to
cloudstream/app/src/main/java/com/lagradost/cloudstream3/MainActivity.kt
Lines 561 to 563 in 1a852f1
| when (destination.id) { | |
| in listOf(R.id.navigation_downloads, R.id.navigation_download_child) -> { | |
| navRailView.menu.findItem(R.id.navigation_downloads).isChecked = true |
It is such a weird issue because the mutex is surrounded by a try catch. I will try to fix it.
This is intentional and I tried to clarify that using the wording in the popup. The queued downloads are instantaneous and easy to readd, making them of lower importance. While active downloads, which require link loading, are presumed to be more important, requiring explicit intent to cancel or pause.
All of this behavior is intentional, although some of it may change in a future update. While it would be nice to move the separator or active downloads it would complicate the system, pull request and UX too much. Future pull requests may try to improve this, this pull request is big enough already.
I thought I fixed that issue, but I suppose not. Thank you for reporting it.
Will fix 👍
I will add a click to cancel popup to each. However, I do not want to add more buttons to the result fragment. It already lacks space. A cancel all button in the queue menu is enough in my opinion.
I think the state is not properly set. I will try to fix. Thank you for your review ❤️ |
That makes sense and yeah I wasn't sure.
Same as above
I wasn't necessarily thinking another button but rather replace the download all with cancel all if all in progress or delete all if all downloaded in that available batch, but the other button works too. Was just an idea, but isn't actually necessary for this PR. I think the first part of this I mentioned where you can't cancel at all until it finishes finding links is probably a bug though that could be fixed but not certain if that was intentional as well or not.
Of course, this PR really works amazing. Downloads no longer lag the entire app when in progress and the UI especially queue and instant download feedback is amazing. |



Changes the whole download system to:
Remaining issues to fix:
I plan to complete this pull request this week.